package cn.woniu.ecommerceplatform.controller;


import cn.woniu.ecommerceplatform.entity.Menu1;
import cn.woniu.ecommerceplatform.entity.Menu3;
import cn.woniu.ecommerceplatform.service.MenuService;
import cn.woniu.ecommerceplatform.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MenuController {
    @Autowired
    private MenuService menuService;
    @RequestMapping("/menulist")
//    @PreAuthorize("hasAnyAuthority('auth:default')")
    public ResponseResult<List<Menu1>> menuList(){
        return menuService.menuList();
    }

    @RequestMapping("/menuListCustomer")
    public ResponseResult<List<Menu3>> menuListCustomer(){
        return menuService.menuListCustomer();
    }
}
